%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ft=erlang ts=4 sw=4 et
OtpVersion = erlang:system_info(otp_release),
if
    OtpVersion >= "21" ->
        case lists:keysearch(erl_opts, 1, CONFIG) of
            {value, {erl_opts, Opts2}} ->
                lists:keyreplace(erl_opts, 1, CONFIG, {erl_opts, [{d, deprecate_stacktrace}|Opts2]});
            false ->
                [{erl_opts, [{d, deprecate_stacktrace}]}|CONFIG]
        end;
    true ->
        CONFIG
end.
